
//server_url=http://10.10.117.84:9090/
//AccessKey=rzx  SecretKye=Rzx@1218
//bicketname=sict


var Minio = require('minio')

var minioClient = new Minio.Client({
    endPoint: '10.10.117.84',
    port: 9090,
    useSSL: false,
    accessKey: 'rzx',
    secretKey: 'Rzx@1218'
});


// File that needs to be uploaded.
var file = './baidu-1625123776565.png'

var metaData = {
    'Content-Type': 'application/octet-stream',
    'X-Amz-Meta-Testing': 1234,
    'example': 5678
}
// Using fPutObject API upload your file to the bucket europetrip.
minioClient.fPutObject('test02', 'baidu-1625123776565.png', file, metaData, function(err, etag) {
  if (err) return console.log(err)
  console.log('File uploaded successfully.')
});

// Make a bucket called sict.
// minioClient.makeBucket('test02', 'screenshot', function(err) {
//     if (err) return console.log(err)

//     console.log('Bucket created successfully in "screenshot".')

//     var metaData = {
//         'Content-Type': 'application/octet-stream',
//         'X-Amz-Meta-Testing': 1234,
//         'example': 5678
//     }
//     // Using fPutObject API upload your file to the bucket europetrip.
//     minioClient.fPutObject('test02', 'baidu-1625123776565.png', file, metaData, function(err, etag) {
//       if (err) return console.log(err)
//       console.log('File uploaded successfully.')
//     });
// });

